{% extends 'user.html' %}

{% block edit_form %}

{% if perms.auth.change_user or user_id == user.id %}

	<div class="editingWrapper">
	  <h2 id="edit">Edit profile</h2>
	    {% if display_tips %}
	    <div class="tip">
	      <ol>
	        <li><p>To remove chosen phone make it's value empty.</p></li>
	        <li><p>To change any part of your data, password is required. Make sure you typed it.</p></li>
	      </ol>
	    </div>
	    {% endif %}
	    <div style='margin-top: 2em;'>
	        <div class='content_form' style='margin-top: 1em'>
	            <form action='#edit' method='POST' class='registration_form'>
	                {{ form_content.non_field_errors }}
	                <table>
	                    {% for field in form_content %}
	                        <tr>
	                            <td>{%if field.label_tag|removetags:"label" %}{{ field.label_tag }}:{%endif%}</td>
	                            <td>{{ field }}</td>
	                            <td>{{ field.errors }}</td>
	                        </tr>
	                    {% endfor %}
	                    <tr><td></td><td><input type="submit" value="Update profile"></td><td></td></tr>
	                </table>
	            </form>
	        </div>
	        <b>{{ edit_info }}</b>
	    </div>
	</div>
	
{% endif %} <!-- has edit perms -->

{% endblock %}
